<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>jQuery Form labels Plugin</title>
        <script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="Scripts/jquery-ui-1.8.20.custom.min.js" type="text/javascript"></script>
        <script src="Scripts/jquery.formLabels1.0.js" type="text/javascript"></script>
        <script src="Scripts/ServletAddress.js" type="text/javascript"></script>
        <script type="text/javascript">		
		var  session=null;
		$(document).ready(function(){
			
			$("#submit").click(function(){
				//jQuery(window.parent.document).find("#login").fadeOut(1500);
				var userName=$("#email-input").attr("value");
				var psw=$("#password-input").attr("value");
				//alert(userName+"  "+psw);
				$.post(ServletAddress+registerAdd+"UserName="+userName+"&PassWd="+psw,function(result){ 				
					if(result=="RegisterSuccess")
					{
						alert("注册成功！");
						//$("#cont").fadeOut(1500);
						//window.location.href="http://localhost:8090/RealHouse/";
					}	
					else
					{
						alert("注册失败！");						
										
					}						
				});	
			});
		});
			
            $(function(){ 
                $.fn.formLabels();
                $("form").submit(function(){
                    var formVal = $("form").serialize();
                    parent.$("#default div.results").html(formVal);
                    return false
                });				
            });
        </script>
        <link href="CSS/loginStyle.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div id="cont" class="group" style="position:absolute; left:0; top:0;">
    	<form method="post" action="" id="login">
        	<h3>注册新的账号</h3>
                <div class="field"><input type="email" name="email" title="用户名" id="email-input" /></div>
                <div class="field"><input type="password" name="password" title="密码" id="password-input" /></div>	
				
				<div id="submit" class="submit"><button type="submit">注册</button></div>    
								
				
        </form>
      </div>
</body>
</html>
